﻿<Window x:Class="_7DTD_SingleMapRenderer.Tools.FontTestWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Font test" Height="250" Width="350">
    <Window.Resources>
        <ObjectDataProvider x:Key="ColorValues" ObjectInstance="{x:Type Colors}" MethodName="GetProperties"/>
    </Window.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <TextBlock Grid.Row="0" TextWrapping="Wrap" Grid.ColumnSpan="2" Margin="5,5,5,15">
            <Run Text="This tool renders some text in all installed fonts to a png file."/> <LineBreak/>
            <Run Text="Background is always black, text color and size can be changed."/><LineBreak/>
            <Run Text="It's purpose is to show you how the rendered text will look like. Choose your favorite!"/>
        </TextBlock>

        <TextBlock Grid.Row="1" Grid.Column="0" Text="Color: "/>
        <ComboBox Grid.Row="1" Grid.Column="1"
                  ItemsSource="{Binding Source={StaticResource ColorValues}}" SelectedValuePath="Name"
                  SelectedValue="{Binding SelectedGridColorName}">
            <ComboBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <Border Width="25" Margin="0,0,5,0" Background="{Binding Name}"/>
                        <TextBlock VerticalAlignment="Center" Text="{Binding Name}"/>
                    </StackPanel>
                </DataTemplate>
            </ComboBox.ItemTemplate>
        </ComboBox>
        
        <TextBlock Grid.Row="2" Grid.Column="0" Text="Size: "/>
        <TextBox Grid.Row="2" Grid.Column="1" Text="{Binding Fontsize}" />
        
        <Button Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Bottom" Padding="10,2" Margin="10" Content="Save png . . ." Click="Button_Click"/>
        
    </Grid>
</Window>
